package com.framework.service.core.dao.mapper;

import com.framework.common.jdbc.base.BaseMapper;
import com.framework.service.core.dao.model.ThirdUserInfo;
import com.framework.service.core.dao.model.ThirdUserInfo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ThirdUserInfoMapper extends BaseMapper<ThirdUserInfo> {


    /**
     * 新增第三方用户信息
     * @param record
     * @return
     */
    int insertThirdUserSelective(ThirdUserInfo record);

    List<ThirdUserInfo> getSingleThirdUserInfo(ThirdUserInfo record);

    List<ThirdUserInfo> getThirdUserInfoByUnionId(String unionId);

    /**
     * 根据openid获取第三方用户信息
     * @param openId
     * @return
     */
    ThirdUserInfo getThirdUserInfoByOpenId(String openId);

    /**
     * 根据openId更新第三方用户信息
     * @param record
     * @return
     */
    int updateByOpenId(ThirdUserInfo record);

    int updateByUnionId(ThirdUserInfo record);
}